<template>
	<div class="app-container">
        <div class="filter-container">
        	<el-form :inline="true"  class="search-form-inline" label-width="80px" size="small">
				<slot></slot>
			</el-form>
		</div>
	</div>
</template>

<script type="text/javascript">
	export default {
		name: 'xForm',
		data(){
			return {
				fields: []
			}
		},
		props: {
			model:{type: Object},
			rules:{type: Object},
		},
		created(){
			this.$on('form-add', field => {
				if(field)
					this.fields.push(field);
			});
			this.$on('form-remove', field => {
				if(field.prop)
					this.fields.splice(this.fields.indexOf(field), 1);
			});
		}
	}
</script>